﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orchard.Rules.Services;
using Orchard.Rules.Models;
using Orchard.Localization;
using Piedone.Facebook.Suite.Services;
using Facebook;
namespace Piedone.Facebook.Suite.Rules.Rules
{
    public class PostToFacebookPageAction : IActionProvider
    {
        private readonly IFacebookSuiteService _facebookSuiteService;

        public Localizer T { get; set; }

        public PostToFacebookPageAction(IFacebookSuiteService facebookSuiteService)
        {
            _facebookSuiteService = facebookSuiteService;

            T = NullLocalizer.Instance;
        }
        
        public void Describe(DescribeActionContext describe)
        {
            describe.For("Notification", T("Notification"), T("Notifications"))
                .Element(
                    "PostToFbPage",
                    T("Post to FB Page"),
                    T("Posts content to a Facebook Page"),
                    context =>
                    {
                        //var client = new FacebookWebClient(_facebookSuiteService.FacebookClient);
                        return true;
                    },
                    context => T("Post to FB Page"),
                    "ActionPostToFacebookPage");
        }
    }
}
